package cn.com.header.web.service.sys;

import cn.com.header.web.mapper.sys.AuthorityDAO;
import cn.com.header.web.model.sys.Authority;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户Service实现类
 *
 * @author StarZou
 * @since 2014年7月5日 上午11:54:24
 */
@Service
public class AuthorityServiceImpl implements AuthorityService {

    @Autowired
    AuthorityDAO authorityDAO;
    @Override
    public List<Authority> selectAuthorityByRoleId(Long roleId) {
        return authorityDAO.selectAuthorityByRoleId(roleId);
    }

    @Override
    public List<Authority> getFirstAuth(Long userId) {
        return authorityDAO.getFirstAuth(userId);
    }

    @Override
    public List<Authority> getChildList(Long parentId) {
        return authorityDAO.getChildList(parentId);
    }

    @Override
    public List<Authority> getAllFirstAuth() {
        return authorityDAO.getAllFirstAuth();
    }

    @Override
    public List<Authority> queryForParentId(Long parentId) {
        return authorityDAO.queryForParentId(parentId);
    }
}
